﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZombieSurvival
{
    class Addiction
    {
        private const int MinimalAddictionLevel = 3;

        public Addiction(int type)
        {
            CheckType(type);
        }

        public Addiction(uint intencity, int type)
        {
            Intencity = intencity;
            CheckType(type);
        }

        private void CheckType(int type)
        {
            if (Enum.GetValues(typeof(Enums.Addictions)).Cast<object>().Any(variable => type == (int)variable))
            {
                AddictionType = type;
                return;
            }
            throw new ArgumentException("wrong type of addicrion");
        }

        public int AddictionType { get; private set; }

        public uint Intencity { get; private set; }

    }
}
